//
//  CustomCell.m
//  Custom Cell
//
//  Created by Yang on 12-6-8.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "CustomCell.h"

@implementation CustomCell

@synthesize delegate;

@synthesize nameLabel;
@synthesize name;

@synthesize Userflag;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setName:(NSString *)n {
    
    if (![n isEqualToString:name]) {
        name = [n copy];
        self.nameLabel.text = name;
    }
}

- (IBAction)ShowUser:(id)sender {
    
    [delegate passShowValue:1 EditValue:0 UserValue:self.Userflag];

}

- (IBAction)editUser:(id)sender {

    [delegate passShowValue:0 EditValue:1 UserValue:self.Userflag];

}

@end
